package jm.nj.day01mian.demo01;

/*
 *
 *
 * */
public class DemoStudent {
    public static void main(String[] args) {
        //使用空参数构造方法创建对象
        Student s1 = new Student();
        //使用set方法进行属性赋值
        s1.setName("老三");
        s1.setAge(18);

        System.out.println(s1.getName() + "...." + s1.getAge());

        s1.study();

        Student s2 = new Student("王五", 40);

        System.out.println(s2.getName() + "...." + s2.getAge());

        //使用set修改
        s2.setName("王六");
        s2.study();
    }
}
